/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 1:16 PM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.Additional.IDescription
import Cn.Sarkar.Entities.Common.Additional.IName
import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.Entities.IMS.IUnit
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.Units

class Unit(DataContext: IDataContext) : IUnit, BaseEntity(DataContext, Units) {
    var nameID by Units.NameID
    override var name: IName by hasOne(Units.NameID) { Name(it) }
    var descriptionID by Units.DescriptionID
    override var description: IDescription by hasOne(Units.DescriptionID) { Description(it) }
    override var splitable: Boolean by Units.Splitable
}